/*
 * @Author: 张帆 zhangfan@jxtech.net
 * @Date: 2024-09-13 10:56:12
 * @LastEditors: 张帆 zhangfan@jxtech.net
 * @LastEditTime: 2024-09-13 11:44:27
 * @FilePath: /vue3_test/src/utils/myconfirm.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/**
 * 信息确定提示框
 */

import { ElMessageBox } from 'element-plus'

export default function myConfirm(text) {
    return new Promise((resolve, reject) => {
        ElMessageBox.confirm(text,'系统提示',
            {
              confirmButtonText: '确定1',
              cancelButtonText: '取消',
              type: 'warning'
            }
        ).then(() => {
            resolve(true)
         })
        .catch(() => {
            reject(false)
        })
    }).catch(() => {
        return false
    })
}